package com.springmvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

@Controller
@RequestMapping("/center")
public class ViewController {

    @RequestMapping("/center")
    public ModelAndView center() {
        ModelAndView mv = new ModelAndView();
        mv.addObject("username", "admin");
        mv.setViewName("center");
        return mv;
    }
}

